# 注意!!!!先看这里
#  运行此程序务必先做这些事情：!!!!
#  1.务必安装python
#  2.务必通过cmd 执行pip install selenium
#  3.务必安装谷歌浏览器
#  4.务必安装驱动(webdrive) 地址：https://chromedriver.storage.googleapis.com/index.html 点击谷歌浏览器右上角三个。。。点击帮助再点击关于找到版本号 再安装驱动
#  5.然后跑一下我的脚本试试 成功的话跳下一步
#  6.设置自动每日一报 参考下一个文件
from selenium import webdriver
wd = webdriver.Chrome(r'C:\Users\humeiersi777\Downloads\chromedriver_win32\chromedriver.exe')
wd.implicitly_wait(10)
wd.get('https://id.sspu.edu.cn/cas/login?service=https%3a%2f%2fhsm.sspu.edu.cn%2fselfreport%2fLoginSSO.aspx%3ftargetUrl%3d%7bbase64%7daHR0cHM6Ly9oc20uc3NwdS5lZHUuY24vc2VsZnJlcG9ydC9JbmRleC5hc3B4')
input1=wd.find_element_by_id('username')
input2=wd.find_element_by_id('password')
btn=wd.find_element_by_css_selector('.submit_button')
input1.send_keys('你的账号')
input2.send_keys('你的密码')
btn.click()
a=wd.find_element_by_css_selector('[href="DayReportSelect.aspx"]')
a.click()
i1=wd.find_element_by_id('fineui_2-inputEl-icon')
i1.click()
temp=wd.find_element_by_id('p1_TiWen-inputEl')
temp.send_keys(36)
i2=wd.find_element_by_id('fineui_13-inputEl-icon')
i2.click()
i3=wd.find_element_by_id('fineui_15-inputEl-icon')
i3.click()
i4=wd.find_element_by_id('p1_CheckAddress-inputEl-icon')
i4.click()
sub=wd.find_element_by_class_name('f-btn-text')
sub.click()
import time
time.sleep(1)
sure=wd.find_element_by_css_selector('#fineui_39 span span')
sure.click()
